/*
 * capture.cpp
 *
 *  Created on: Oct 8, 2012
 *      Author: Matthijs
 */
#include <camera/camera.h>


/**
 *	Capture from camera.
 */
void Camera::captureImage ()
{
	(*captureRight) >> left;
	ROS_INFO("Parsing image.");

	//left = cv::imread("test_left.jpg");

//	imshow( "camera window", left );

	if (!left.data)// || !right.data)
	{
		ROS_ERROR("Could not retrieve image frames.");
		return;
	}
	try {
		findSquares(left);
	} catch (cv::Exception & e) {
		imshow( "parse window", left );
	}
}
